package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@Mapper
public interface ApArticleMapper extends BaseMapper<ApArticle> {

    //type 1，加载更多，2-加载更新，
    public List<ApArticle> loadArticleList(ArticleHomeDto dto,Short type);

    public void initImageUrl();

//    @Select("select title from ap_article")
//    public List<StringBuffer> selectTitle();
    public List<Long> selectIds();

    public List<String> selectTitles();

    public String selectTitle(Long id);

    public void updateStaticUrlById(@Param("url") String url,@Param("id") Long id);

    public void updateTitle(@Param("id")Long id,@Param("NewTitle") String NewTitle);
}
